Completed
Push — master ( b8a2ae...421529 )
by Samson
02:36
created

AsciiConverterTest.js ➔ ... ➔ ???   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 6
nc 1
nop 0
dl 0
loc 8
rs 10
c 0
b 0
f 0
1
const assert = require('assert');
2
3
const TestCase = require('./TestCase');
4
const AsciiConverter = require('../src/Converter/AsciiConverter');
5
const NotGeezArgumentException = require('../src/Exception/NotGeezArgumentException');
6
7
const asciiConverter = new AsciiConverter();
8
9
/* global describe, it */
10
11
describe('AsciiConverterTest', () => {
12
  describe('#test_ascii_converter()', () => {
13
    it('should convert geez number to ascii', () => {
14
      TestCase.geezNumberTestDataProvider().forEach(([$ascii, $geez]) => {
15
        const $result = asciiConverter.convert($geez);
16
        assert.equal($ascii, $result);
17
      });
18
    });
19
  });
20
21
  describe('#test_invalid_number_throw_exception()', () => {
22
    it('should throws NotGeezArgumentException', () => {
23
      TestCase.invalidNumberDataProvider().forEach(([$value]) => {
24
        assert.throws(() => {
25
          asciiConverter.convert($value);
26
        }, NotGeezArgumentException);
27
      });
28
    });
29
  });
30
});
31